package brad.zimmerman.dungeon.game;

import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.view.View;

public class ClassGraphicScaling {
	public Bitmap[] graphicScaled;
	private ClassGraphicObject resourceHolder;
	
	//The view and the rawresources need to be put in here together so that 
	//the pictures can be scaled precisely the same way every time
	ClassGraphicScaling(Resources resource, int[] resources, int scale){
		graphicScaled = new Bitmap[resources.length];
		for(int i = 0; i < resources.length;i++){
			resourceHolder = new ClassGraphicObject(BitmapFactory.decodeResource(resource, resources[i]));
			graphicScaled[i] = resourceHolder.getGraphic();
			graphicScaled[i] = Bitmap.createBitmap(graphicScaled[i], 0, 0,(graphicScaled[i]).getWidth(),
        			(graphicScaled[i]).getHeight(), resourceHolder.returnMatrix((graphicScaled[i]).getWidth(),
        					(graphicScaled[i]).getHeight(),scale,false), true);
		}
	}
}
